package core.model
{
import core.model.events.SystemModelEvent;

[Event(name="inited", type="core.model.events.SystemModelEvent")]
/**
 * SystemModel
 * @author jliang
 *
 */
public class SystemModel extends ModelBase
{
    //==========================================================================
    //  Constructor
    //==========================================================================
    public function SystemModel()
    {
        super();
    }
    
    public function initPlayer(avatarKey:String):void
    {
        execute("system_init", 
                      [ avatarKey ], 
                      initCompleteHander);
    }
    
    protected function initCompleteHander(data:Object):void
    {
        this.dispatchEvent(new SystemModelEvent(SystemModelEvent.INITED));
    }
    
    public function hello():void
    {
        execute("system_hello", 
                     null, 
                     helloResponseHander);
    }
    
    protected function helloResponseHander(data:Object):void
    {
        
    }
}
}



